<?php
/**
 * @package		Joomla.Site
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

function modChrome_xhtml1($module, &$params, &$attribs)
{
  $headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
	if (!empty ($module->content)) : ?>
		<div class="module<?php echo htmlspecialchars($params->get('moduleclass_sfx')); ?>">
		<?php if ($module->showtitle != 0) : ?>
			<h<?php echo $headerLevel; ?>><?php echo htmlspecialchars($module->title); ?></h<?php echo $headerLevel; ?>>
		<?php endif; ?>
			<?php echo $module->content; ?>
		</div>
	<?php endif;
}

function modChrome_xhtml2($module, &$params, &$attribs)
{
$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
if (!empty ($module->content)) : ?>
  <div class="module<?php echo htmlspecialchars($params->get('moduleclass_sfx')); ?>">
  	<div class="padding">
  	<?php if ($module->showtitle != 0) : ?>
  	<h<?php echo $headerLevel; ?>><?php echo htmlspecialchars($module->title); ?></h<?php echo $headerLevel; ?>>
    <?php endif; ?> 
    <?php echo $module->content; ?>
  	</div>
  </div>
<?php
endif;
}

function modChrome_xhtml3($module, &$params, &$attribs)
{
$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
  if (!empty ($module->content)) : ?>
  <div class="module<?php echo htmlspecialchars($params->get('moduleclass_sfx')); ?>">
  	<?php if ($module->showtitle != 0) : ?>
  	<h<?php echo $headerLevel; ?>><?php echo htmlspecialchars($module->title); ?></h<?php echo $headerLevel; ?>>
    <?php endif; ?>
  	<div class="padding">
    <?php echo $module->content; ?>
  	</div>
  </div>
<?php
endif;
}

function modChrome_mobile($module)
{
if (!empty ($module->content)) :
  echo "<div data-role=\"collapsible\" data-collapsed=\"true\">";
  echo "<h3>" . htmlspecialchars($module->title) . "</h3>";
  echo $module->content;
  echo "</div>";
endif;
}
?>